// 登录和用户信息相关api
import http from '@/utils/http'

// key对应函数名，value对应api地址
const apiFormData = {
  // 用户存物
  userStorageAdd: 'userStorage/add',
  // 用户存物详情
  userStorageDetail: 'userStorage/detail',
  // 修改存物
  userStorageEdit: 'userStorage/edit',
  // 删除存物
  userStorageDelete: 'userStorage/del',
  // 存物记录列表
  userStorageList: 'userStorage/list',
  // 用户取物
  userStorageTake: 'userStorage/take'
}

export function userStorageAdd(data) {
  return http({
    url: apiFormData.userStorageAdd,
    method: 'post',
    data
  })
}
export function userStorageDetail(data) {
  return http({
    url: apiFormData.userStorageDetail,
    method: 'post',
    data
  })
}
export function userStorageEdit(data) {
  return http({
    url: apiFormData.userStorageEdit,
    method: 'post',
    data
  })
}
export function userStorageDelete(data) {
  return http({
    url: apiFormData.userStorageDelete,
    method: 'post',
    data
  })
}
export function userStorageList(data) {
  return http({
    url: apiFormData.userStorageList,
    method: 'post',
    data
  })
}
export function userStorageTake(data) {
  return http({
    url: apiFormData.userStorageTake,
    method: 'post',
    data
  })
}
